﻿@{
    ViewBag.Title = "BusinessLogIndex";
}
@section head
{
    <link href="@Url.Content("~/ScriptPlugin/easyui/themes/gray/easyui.css")" rel="stylesheet" />
    <link href="@Url.Content("~/ScriptPlugin/easyui/themes/icon.css")" rel="stylesheet" />
    <script type="text/javascript" src="@Url.Content("~/ScriptPlugin/easyui/jquery.easyui.min.js")"></script>
    <script type="text/javascript" src="@Url.Content("~/ScriptPlugin/easyui/locale/easyui-lang-zh_CN.js")"></script>
    <script type="text/javascript" src="@Url.Content("~/Scripts/KingsSharp.DataGrid.Filter.js")"></script>
    <script src="@Url.Content("~/ScriptPlugin/WdatePicker/js/WdatePicker.js")"></script>
}
<div id="grid" style="height:99%;">
    <div id="toolpannel">
        <div class="content-pannel-buttons">
            <a><b class="p-icon-reload">刷新 </b></a>
            <a onclick="$('#grid').datagrid('load')">
                <b class="p-icon-serch">查询</b>
            </a>
        </div>
        <div class="datagrid-filter-pannel" id="filterpannel">
            <table class="content-table-serch">
                    <tr>
                        <th>日志内容</th>
                        <td>
                            <input type="text"  name="Content" data-filter="true" />
                            <a class="p-icon-filter p-icon-filter-style" style="display: block; width: 22px;
                            height: 22px; float: left">@Html.GetFilterItem("Content", typeof(string))</a>
                        </td>
                        <th>
                            日志时间从
                        </th>
                        <td>
                            <input type="text" class="p-icon-right p-icon-date-long" name="CreatedTime" data-filter="true" />
                            <a class="p-icon-filter p-icon-filter-style" style="display: block; width: 22px;
                            height: 22px; float: left">@Html.GetFilterItem("CreatedTime", typeof(DateTime), KingsSharp.Common.Filter.FilterOperate.GreaterOrEqual)</a>
                        </td>
                        <th>
                            到
                        </th>
                        <td>
                            <input type="text" class="p-icon-right p-icon-date-long" name="CreatedTime" data-traget="CreatedTime1" data-filter="true" />
                            <a class="p-icon-filter p-icon-filter-style" style="display: block; width: 22px;
                            height: 22px; float: left">@Html.GetFilterItem("CreatedTime1", typeof(DateTime), KingsSharp.Common.Filter.FilterOperate.LessOrEqual)</a>
                        </td>
                    </tr>
                </table>
            </div>
    </div>
</div>
@section foot{
    <script type="text/javascript">
        function LoadLoginLogData() {
            var columns = [[
              { field: "Action", title: "动作", width: 80 },
                { field: "UserName", title: "操作人", width: 90 },
                { field: "LoginCode", title: "操作账号", width: 120 },
                { field: "Ip", title: "操作Ip", width: 90 },
                { field: "Area", title: "所在地区", width: 90 },
                { field: "Content", title: "操作内容"},
                { field: "CreatedTime", title: "日志时间", width: 120 }
            ]];
            var parameter = {
                title: "@Html.GetGridTitle("日志管理", "业务日志查询")",
                columns: columns,
                singleSelect: true,
                url: "@Url.Content("~/Logs/BusinessLog/GetBusinessLogGridData")",
                pageNumber: 1
            };
            var grid = K.GetGridData("#grid", parameter).Grid;
        }
        LoadLoginLogData();
    </script>
}